﻿@model OMS.Models.UserModelView

@{
    ViewBag.Title = "EditUser";
}

<h2>EditUser</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    @Html.HiddenFor(m => m.Login)
    @Html.HiddenFor(m => m.Role)
    @Html.HiddenFor(m => m.Id)
        <table align=center>
            <tr>
                <td>@Html.LabelFor(m => m.FirstName)</td>
                <td>@Html.EditorFor(m => m.FirstName)</td>
                <td>@Html.ValidationMessageFor(m => m.FirstName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.LastName)</td>
                <td>@Html.EditorFor(m => m.LastName)</td>
                <td>@Html.ValidationMessageFor(m => m.LastName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Password)</td>
                <td>@Html.EditorFor(m => m.Password)</td>
                <td>@Html.ValidationMessageFor(m => m.Password)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.ConfirmPassword)</td>
                <td>@Html.EditorFor(m => m.ConfirmPassword)</td>
                <td>@Html.ValidationMessageFor(m => m.ConfirmPassword)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Email)</td>
                <td>@Html.EditorFor(m => m.Email)</td>
                <td>@Html.ValidationMessageFor(m => m.Email)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Region)</td>
                <td>@Html.EditorFor(m => m.Region)</td>
                <td>@Html.ValidationMessageFor(m => m.Region)</td>
            </tr>
        </table>
        <button type="submit">Save changes</button>
}
<br />
<div>
    @Html.ActionLink("Back to Admin", "Index")
</div>